<?php
/**
 * Some basic configure option and error code defination
 * for comic.solor.cn models
 */

// database connection parameters
define("C_DB_HOST", "localhost");
define("C_DB_DB", "comic_solor_cn");
define("C_DB_USER", "root");
define("C_DB_PASS", "");


// triger debug mode
define("C_DEBUG", true);

/// 本地保存漫画图片的basepath
define("C_LOCAL_IMAGE_BASE_PATH", "/home/rainx/land/comics/");
/// 远程漫画图片的baseurl
define("C_REMOTE_IMAGE_BASE_URL", "http://localhost/imgs/");
/// 远程图片的basepath
define("C_REMOTE_IMAGE_BASE_PATH", "/var/www/imgs/");
/// 远程图片主机的地址
define("C_REMOTE_IMAGE_HOST", "localhost");
/// 远程图片主机的ftp帐号
define("C_REMOTE_IMAGE_USER", "rainx");
/// 远程图片主机的ftp密码
define("C_REMOTE_IMAGE_PASS", "test");
/// imagemagick convert程序的路径
define("C_IMK_CONVERT", "/usr/bin/convert");
/// imagemagick identify程序的路径
define("C_IMK_IDENTIFY", "/usr/bin/identify");
/// 要转换的所略图的大小width
define("C_T_IMG_WIDTH", "90");
/// 要转换的所略图的大小height
define("C_T_IMG_HEIGHT", "110");

/// old hawk err codes============================
// database err code

// true and false
define ("C_TRUE" , 1);
define ("C_FALSE", 0);

// For unkown error
define ("C_UNKOWN_ERROR", 0);

// Error while Add VO in DAO
define ("C_MODEL_NO_TABLE_NAME", 22001);
define ("C_MODEL_ADD_VO_ERROR", 22002);
define ("C_MODEL_VO_NOT_ALLLOWED_KEY", 22003);

// execute on empty VO
define ("C_MODEL_PROCESS_EMPTY_VO", 22004);

// For PDO operation 
// Perpare Error
define ("C_PDO_PREPARE_ERROR", 22011);
// Error While execuing SQL
define ("C_PDO_EXECUTE_ERROR", 22012);
// Error While querying SQL
define ("C_PDO_QUERY_ERROR", 22013);

// For PDO init
define ("C_PDO_DB_CONNECT_ERROR", 22014);

// For FILE OPERATION
define ("C_FILE_NOT_EXIST_ERROR", 11001);
define ("C_FILE_OPEN_ERROR", 11002);
define ("C_FILE_WRITE_ERROR", 11003);
define ("C_FILE_READ_ERROR", 11004);
define ("C_FILE_CLOSE_ERROR", 11005);

// For DIRECTORY OPERATION
define ("C_DIR_CREATE_ERROR", 11011);

// For JSON parse
define ("C_JSON_ENCODE_ERROR", 10001);
define ("C_JSON_DECODE_ERROR", 10002);


// For frontend 

define ("C_FRONTEND_NO_PARAM", 28001);
define ("C_FRONTEND_PARAM_TOO_LONG", 28002);
define ("C_FRONTEND_PARAM_TOO_SHORT", 28003);
define ("C_FRONTEND_PARAM_INVALID_TYPE", 28004);
?>
